from tkinter import *



coords = [0,0,10,0,10,10,20,10,20,20,10,20,10,30,0,30]


root=Tk()
root.title("ИТ марафон")
root.geometry("500x500")

x=int(input())
y=int(input())
n=int(input())
if n==0 and x>=0 and x<=500 and y>=0 and y<=500:
    pass
else:
    if n>0 and 0*n+x>=0 and 0*n+y>=0 and 20*n+x<=500 and 20*n+y<=500:
        pass
    else:
        if n<0 and 20*n+x>=0 and 20*n+y>=0 and 0*n+x<=500 and 0*n+y<=500:
            pass
        else:
            print('Размер фигуры превышает максимальный размер поля')
            exit()




canvas = Canvas(bg="white",width=500, height=500)
canvas.pack(anchor=CENTER, expand=1)
canvas.create_polygon(coords[0] *n+x, coords[1] *n+x,
                      coords[2] *n+x, coords[3] *n+x,
                      coords[4] *n+x, coords[5] *n+x,
                      coords[6] *n+x, coords[7] *n+x,
                      coords[8] *n+x, coords[9] *n+x,
                      coords[10] *n+x, coords[11] *n+x,
                      coords[12] *n+x, coords[13] *n+x,
                      coords[14] *n+x, coords[15] *n+x)
root.mainloop()
#Русанова Ксения 7И
